package com.xsg.printer.core.enums;

public enum FontSizeEnum {

    SMALL_XX(1, "最小", 12),

    SMALL_X(2, "较小", 14),

    SMALL(3, "小", 16),

    MEDIUM(4, "正常", 18),

    LARGE(5, "大", 22),

    LARGE_X(6, "较大", 26),

    LARGE_XX(7, "非常大", 30),

    LARGE_XXX(8, "超级大", 36),
    ;

    private Integer type;

    private String name;

    private Integer imageValue;

    FontSizeEnum(int type, String name, Integer imageValue) {
        this.type = type;
        this.name = name;
        this.imageValue = imageValue;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public Integer getImageValue() {
        return imageValue;
    }

    public static FontSizeEnum getEnumByType(Integer type) {
        for (FontSizeEnum value : values()) {
            if(value.getType().equals(type)){
                return value;
            }
        }
        return FontSizeEnum.MEDIUM;
    }
}
